<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SC2API: sc2::ActionFeatureLayerInterface Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="SC2-Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SC2API
   </div>
   <div id="projectbrief">An API for AI for StarCraft II</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sc2</b></li><li class="navelem"><a class="el" href="classsc2_1_1_action_feature_layer_interface.html">ActionFeatureLayerInterface</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsc2_1_1_action_feature_layer_interface-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">sc2::ActionFeatureLayerInterface Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="sc2__interfaces_8h_source.html">sc2_interfaces.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a425ea9449bdde698047f2b32eae44f62"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_action_feature_layer_interface.html#a425ea9449bdde698047f2b32eae44f62">UnitCommand</a> (<a class="el" href="classsc2_1_1_s_c2_type.html">AbilityID</a> ability)=0</td></tr>
<tr class="separator:a425ea9449bdde698047f2b32eae44f62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d58e436d717242917645d27e772999f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_action_feature_layer_interface.html#a8d58e436d717242917645d27e772999f">UnitCommand</a> (<a class="el" href="classsc2_1_1_s_c2_type.html">AbilityID</a> ability, const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;point, bool minimap=false)=0</td></tr>
<tr class="separator:a8d58e436d717242917645d27e772999f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d41928e74a3988ff218047e6ce7f1d9"><td class="memItemLeft" align="right" valign="top"><a id="a6d41928e74a3988ff218047e6ce7f1d9"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_action_feature_layer_interface.html#a6d41928e74a3988ff218047e6ce7f1d9">CameraMove</a> (const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;center)=0</td></tr>
<tr class="memdesc:a6d41928e74a3988ff218047e6ce7f1d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves the camera to be centered around a position. Coordinate is position on minimap feature layer. <br /></td></tr>
<tr class="separator:a6d41928e74a3988ff218047e6ce7f1d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae61f19efc78b6114d91ca64f1fb72108"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_action_feature_layer_interface.html#ae61f19efc78b6114d91ca64f1fb72108">Select</a> (const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;center, PointSelectionType selection_type)=0</td></tr>
<tr class="separator:ae61f19efc78b6114d91ca64f1fb72108"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a084b4cd006586c0a9637b1067a437a42"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_action_feature_layer_interface.html#a084b4cd006586c0a9637b1067a437a42">Select</a> (const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;p0, const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;p1, bool add_to_selection=false)=0</td></tr>
<tr class="separator:a084b4cd006586c0a9637b1067a437a42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9f434ec52e62fac77dcb99f9cc81080"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_action_feature_layer_interface.html#ab9f434ec52e62fac77dcb99f9cc81080">SendActions</a> ()=0</td></tr>
<tr class="separator:ab9f434ec52e62fac77dcb99f9cc81080"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="classsc2_1_1_action_feature_layer_interface.html">ActionFeatureLayerInterface</a> emulates UI actions in feature layer. Not available in replays. Guaranteed to be valid when the OnStep event is called. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ae61f19efc78b6114d91ca64f1fb72108"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae61f19efc78b6114d91ca64f1fb72108">&#9670;&nbsp;</a></span>Select() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sc2::ActionFeatureLayerInterface::Select </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;&#160;</td>
          <td class="paramname"><em>center</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PointSelectionType&#160;</td>
          <td class="paramname"><em>selection_type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Selection of a point, equivalent to clicking the mouse on a unit. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">center</td><td>The feature layer 'pixel' being clicked on. </td></tr>
    <tr><td class="paramname">selection_type</td><td>Any modifier keys, for example if 'shift-click' is desired. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a084b4cd006586c0a9637b1067a437a42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a084b4cd006586c0a9637b1067a437a42">&#9670;&nbsp;</a></span>Select() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sc2::ActionFeatureLayerInterface::Select </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;&#160;</td>
          <td class="paramname"><em>p0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;&#160;</td>
          <td class="paramname"><em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>add_to_selection</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Selection of an area, equivalent to click-dragging the mouse over an area of the screen. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">p0</td><td>The feature layer pixel where the first click occurs (mouse button down). </td></tr>
    <tr><td class="paramname">p1</td><td>The feature layer pixel where the drag release occurs (mouse button up). </td></tr>
    <tr><td class="paramname">add_to_selection</td><td>Will add newly selected units to an existing selection. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab9f434ec52e62fac77dcb99f9cc81080"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9f434ec52e62fac77dcb99f9cc81080">&#9670;&nbsp;</a></span>SendActions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sc2::ActionFeatureLayerInterface::SendActions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This function sends out all batched selection and unit commands. You DO NOT need to call this function in non real time simulations since it is automatically called when stepping the simulation forward. You only need to call this function in a real time simulation. </p>

</div>
</div>
<a id="a425ea9449bdde698047f2b32eae44f62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a425ea9449bdde698047f2b32eae44f62">&#9670;&nbsp;</a></span>UnitCommand() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sc2::ActionFeatureLayerInterface::UnitCommand </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsc2_1_1_s_c2_type.html">AbilityID</a>&#160;</td>
          <td class="paramname"><em>ability</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Issues a command to whatever is selected. Self targeting. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ability</td><td>The ability id of the command. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8d58e436d717242917645d27e772999f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d58e436d717242917645d27e772999f">&#9670;&nbsp;</a></span>UnitCommand() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sc2::ActionFeatureLayerInterface::UnitCommand </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsc2_1_1_s_c2_type.html">AbilityID</a>&#160;</td>
          <td class="paramname"><em>ability</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d_i.html">Point2DI</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>minimap</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Issues a command to whatever is selected. Uses a point as a target for the command. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ability</td><td>The ability id of the command. </td></tr>
    <tr><td class="paramname">point</td><td>The 2D world position to target. </td></tr>
    <tr><td class="paramname">minimap</td><td>Target in the minimap instead of the map. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/sc2api/<a class="el" href="sc2__interfaces_8h_source.html">sc2_interfaces.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
